// Copyright (c) 2020 Presto Labs Pte. Ltd.
// Author: donggu

#define DOCTEST_CONFIG_IMPLEMENT
#define ANKERL_NANOBENCH_IMPLEMENT
#include <doctest.h>
#include <nanobench.h>

int main(int argc, char** argv) {
  doctest::Context context;

  // context.addFilter("test-case", "bench*");
  bool found = false;
  for (int i = 1; i < argc; i++) {
    if (strncmp(argv[i], "--test-case", 11) == 0 || strncmp(argv[i], "-tc", 3) == 0) {
      found = true;
      break;
    }
  }
  if (!found) {
    context.addFilter("test-case", "bench*");
  }
  context.applyCommandLine(argc, argv);

  int res = context.run();  // run
  return res;
}
